package com.dzl.voucherSecretGroup.dao;

import com.dzl.base.mapper.BaseMapper;
import com.dzl.voucherSecretGroup.pojo.WelfareVoucherSecretGroup;
import com.dzl.voucherSecretGroup.pojo.query.VoucherSecretGroupQuery;
import com.dzl.voucherSecretGroup.pojo.vo.VoucherSecretGroupSellVo;
import com.dzl.voucherSecretGroup.pojo.vo.VoucherSecretGroupVo;
import org.apache.ibatis.annotations.Param;
import org.springframework.stereotype.Repository;

import java.util.List;

/**
 * 劵密分组表(WelfareVoucherSecretGroup)表数据库访问层
 * @author caobucao
 * @date 2021-05-22 14:17:50
 */
@Repository
public interface WelfareVoucherSecretGroupMapper extends BaseMapper<WelfareVoucherSecretGroup> {

    /**
     * 查询券密组
     * @date 2021/5/22 14:34
     * @author caobucao
     * @param query 查询条件
     * @return java.util.List<com.dzl.voucherSecretGroup.pojo.vo.VoucherSecretGroupVo>
     */
    List<VoucherSecretGroupVo> selectVoucherSecretGroupVoList(VoucherSecretGroupQuery query);

    /**
     * 通过id查询券密组
     * @date 2021/5/22 18:46
     * @author caobucao
     * @param id 券密组id
     * @return com.dzl.voucherSecretGroup.pojo.vo.VoucherSecretGroupVo
     */
    VoucherSecretGroupVo selectVoucherSecretGroupVoById(@Param("id") Integer id);

    /**
     * 查询券密关联商品数
     * @date 2021/6/23 11:17
     * @author caobucao
     * @param id 主键id
     * @return java.lang.Integer
     */
    Integer selectCountRelateGoods(@Param("id") Integer id);

    /**
     * 获取券密组信息
     * @author ChenLong
     * @date 2021-06-30 09:36:09
     * @param voucherGroupId 券密组id
     * @return java.util.List<com.dzl.voucherSecretGroup.pojo.vo.VoucherSecretGroupSellVo>
     **/
    VoucherSecretGroupSellVo getVoucherSecretGroupWithSellInfo(@Param("voucherGroupId") Integer voucherGroupId);
}
